/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       beastmaster_hut.h

	$Header: /game/beastmaster_hut.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef BEASTMASTER_HUT_H_INCLUDED
#define BEASTMASTER_HUT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bool_array.h"
#include "skill_set.h"
#include "stationary_adventure_object.h"

enum t_skill_type;

// ------------------------------------------------------------------------
// learn a primary skill
// ------------------------------------------------------------------------
class t_beastmaster_hut : public t_stationary_adventure_object
{
public:
	t_beastmaster_hut( t_stationary_adventure_object const& source );
	virtual void         activate_trigger( t_army* army, t_adv_map_point const& point, 
		                                   t_direction direction, t_adventure_frame* frame );
	virtual float		 ai_value( t_adventure_ai const& ai, t_creature_array const& army, int move_cost ) const;	
	virtual std::string  get_balloon_help() const;
	virtual int          get_version() const;
	virtual void		 place( t_adventure_map & map, t_adv_map_point const & point );
	virtual bool         read( std::streambuf&						stream, 
						       t_qualified_adv_object_type const&	type,
						       int									version );
	virtual bool		 read_from_map( std::streambuf& stream, t_progress_handler* progress);
	virtual void         right_click( t_mouse_event const& event,
		                              t_adventure_frame* adventure_frame );
	virtual bool         write( std::streambuf& stream ) const;
protected:
	virtual t_skill_set const & get_default_available_skill_set();
	void				show_dialog( std::string const& text, t_level_map_point_2d point );

	t_skill_set  m_available_skills; // Set in read_from_map(), used in place(). Don't use after initialization.
	t_skill_set  m_required_skills;  // Set in read_from_map(), used in place(). Don't use after initialization.
	t_skill_type m_skill;
	t_bool_array m_visited;
};

// ------------------------------------------------------------------------
// learn a primary skill
// ------------------------------------------------------------------------
class t_witch_hut : public t_beastmaster_hut
{
public:
	t_witch_hut( t_stationary_adventure_object const& source );

protected:
	virtual t_skill_set const & get_default_available_skill_set();
};

#endif // BEASTMASTER_HUT_H_INCLUDED